<?php
namespace app\admin\model;

use think\Model;
                    

class ShopCart extends Model
                    
{
                    
    public function getAll($where){
                    
        $rs = ShopCart::where($where)
                    
        ->select();
                    
        return $rs;
                    
    }
                    
    public function getOne($where){
                    
        $rs = ShopCart::where($where)
                    
        ->find();
                    
        return $rs;
                    
    }
                    
    public function add($data){
                    
        $rs = ShopCart::data($data)
                    
        ->save();
                    
        return $rs;
                    
    }
                    
    public function edit($where,$data){
                    
        $rs = ShopCart::where($where)
                    
        ->update($data);
                    
        return $rs;
                    
    }
                    
    public function del($where){
                    
        $rs = ShopCart::where($where)
                    
        ->delete();
                    
        return $rs;
                    
    }
}
                    
